Abort Signal
Cancellation primitive matching the Vercel AI SDK v6 AbortSignal shape.
Per port DECISION 3 (cancellation model): we expose a custom interface that internally wraps Kotlin coroutines Job.cancel(). This gives v6 ergonomics (a propagatable signal threaded through tool execution contexts and subagent calls — invariant I-10) while staying native to Kotlin's structured concurrency.
Idiomatic use: bind to the calling CoroutineScope's job. When the scope cancels, the signal aborts, and any subagent/tool execution observing throwIfAborted or register surfaces the cancellation.
Types
Properties
Functions
Register a callback that fires exactly once on abort. If already aborted, fires synchronously. Returns a handle to deregister.
Throws AbortError if isAborted. Cheap to call repeatedly.